<template>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
  <div class="common-layout">
    <el-container>
      <el-header style="background-color: #73767a; height: 60px; display: flex; align-items: center;">
        <el-row :gutter="20">
          <el-col :span="4" style="display: flex; align-items: center;">
            <span class="header-text"> <el-icon><House /></el-icon>招聘者平台</span>
          </el-col>
          <!-- 学院专区和部分企业 -->
          <el-col :span="19" style="text-align: left;">
            <div style="display: flex; margin-top: 10px; justify-content: flex-start;">
              <el-link href="https://element-plus.org" target="_blank" style="color: white; margin-right: 20px;">
                线下招聘会报名
              </el-link>
              <el-link href="https://element-plus.org" target="_blank" style="color: white; margin-right: 20px;">
                岗位信息
              </el-link>
              <el-link href="https://element-plus.org" target="_blank" style="color: white; margin-right: 20px;">
                已收到的简历
              </el-link>
              <el-link href="https://element-plus.org" target="_blank" style="color: white;">
                人才库
              </el-link>
            </div>
          </el-col>
          <el-col :span="1" style="display: flex; align-items: center;">
            <el-button type="primary" style="background-color: #73767a; border-color: #73767a;">
              <el-icon style="color: red; width: 30px"><User /></el-icon>
            </el-button>
          </el-col>
        </el-row>
      </el-header>

      <el-main style="display: flex; flex-direction: column; align-items: center;">
        <el-row :gutter="20">
          <el-col :span="24">
            <div>
              <el-input v-model="input" style="width: 1000px; height: 50px; border: 2px solid black;" placeholder="请输入搜索内容"/>
              <el-button type="primary" style="width: 100px; height: 50px; margin-left: 20px; background-color: #73767a;">搜索</el-button>
            </div>
          </el-col>
        </el-row>
        <el-row :gutter="20">
          <el-col :span="12">
          <ul v-infinite-scroll="load" class="infinite-list" style="overflow: auto;width: 500px;margin-top: 2px">
            <li v-for="i in count" :key="i" class="infinite-list-item">{{ i }}</li>
          </ul>
          </el-col>
          <el-col :span="12" style="text-align: center;">
            <div class="block text-center" m="t-4">
              <el-carousel style="width: 500px" trigger="click">
                <el-carousel-item><img src="carousel1.jpg" style="width: 100%;height: 100%" alt="没加载"></el-carousel-item>
                <el-carousel-item><img src="carousel2.jpg" style="width: 100%;height: 100%" alt="没加载"></el-carousel-item>
                <el-carousel-item><img src="carousel3.jpg" style="width: 100%;height: 100%" alt="没加载"></el-carousel-item>
                <el-carousel-item><img src="carousel4.jpg" style="width: 100%;height: 100%" alt="没加载"></el-carousel-item>
              </el-carousel>
            </div>
          </el-col>
        </el-row>
        <el-row :gutter="20" style="margin-top: 30px">
          <el-col :span="6">
            <el-card class="card" style="max-width: 600px;width: 400px">
              <template #header>
                <div class="card-header">
                  <span>长江大学</span>
                </div>
              </template>
              <p v-for="o in 4" :key="o" class="text item"><el-text class="mx-1" type="warning">Java</el-text>开发工程师</p>
              <template #footer>Footer content</template>
            </el-card>
          </el-col>
          <el-col :span="6">
            <el-card style="max-width: 600px;width: 400px">
              <template #header>
                <div class="card-header">
                  <span>清华大学</span>
                </div>
              </template>
              <p v-for="o in 4" :key="o" class="text item"><el-text class="mx-1" type="warning">UI</el-text>开发工程师</p>
              <template #footer>Footer content</template>
            </el-card>
          </el-col>
          <el-col :span="6">
            <el-card style="max-width: 600px;width: 400px">
              <template #header>
                <div class="card-header">
                  <span>北京大学</span>
                </div>
              </template>
              <p v-for="o in 4" :key="o" class="text item"><el-text class="mx-1" type="warning">运维</el-text>开发工程师</p>
              <template #footer>Footer content</template>
            </el-card>
          </el-col>
          <el-col :span="6">
            <el-card style="max-width: 600px;width: 400px">
              <template #header>
                <div class="card-header">
                  <span>厦门大学</span>
                </div>
              </template>
              <p v-for="o in 4" :key="o" class="text item"><el-text class="mx-1" type="warning">UI</el-text>设计工程师</p>
              <template #footer>Footer content</template>
            </el-card>
          </el-col>
        </el-row>
      </el-main>
      <el-footer>武栋杰的臭脚</el-footer>
    </el-container>
  </div>
</template>

<script setup>
import {ref} from "vue";
const count = ref(0)
const load = () => {
  count.value += 2
}

const images=ref([

  {src:'https://img.alicdn.com/imgextra/i2/O1CN01KqzcZr1VZqxQK6JJ7_!!6000000001499-0-tps-600-600.jpg',alt:'描述图片1'}
])
</script>

<style scoped>
.common-layout .el-header {
  display: flex;
  align-items: center;
}

.common-layout .el-header .el-row {
  width: 100%;
}

.header-text {
  color: white;
  font-weight: bold;
  font-size: 1.5rem; /* Use rem for font size */
  margin-left: 50px;
}

.common-layout {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.el-footer {
  background-color: #73767a;
  color: white;
  text-align: center;
  padding: 10px 0;
}

/* 确保轮播图居中对齐 */
.el-carousel {
  margin-top: 20px;
}

/* 禁止缩放 */
@media screen and (max-width: 600px) {
  body {
    -webkit-text-size-adjust: none;
  }
}
.card{}
.card-header{
  color: red;
  font-size: 1rem;
  /*将字体放到卡面的最右面*/
}
el-carousel__item h3 {
  color: #475669;
  opacity: 0.75;
  line-height: 200px;
  margin: 0;
  text-align: center;
}

.el-carousel__item:nth-child(2n) {
  background-color: #99a9bf;
}

.el-carousel__item:nth-child(2n + 1) {
  background-color: #d3dce6;
}
.infinite-list {
  height: 300px;
  padding: 0;
  margin: 0;
  list-style: none;
}
.infinite-list .infinite-list-item {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 50px;
  background: var(--el-color-primary-light-9);
  margin: 10px;
  color: var(--el-color-primary);
}
.infinite-list .infinite-list-item + .list-item {
  margin-top: 10px;
}
</style>